package com.example.moshudriver.protocol;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import com.external.activeandroid.DataBaseModel;
import com.external.activeandroid.annotation.Column;
import com.external.activeandroid.annotation.Table;

@Table(name = "uservalidcodeRequest")
public class uservalidcodeRequest  extends DataBaseModel
{

     @Column(name = "mobile_phone")
     public String   mobile_phone;

     @Column(name = "ver")
     public int ver;

     @Column(name = "verify_code")
     public String   verify_code;

     public void  fromJson(JSONObject jsonObject)  throws JSONException
     {
          if(null == jsonObject){
            return ;
           }

          JSONArray subItemArray;

          this.mobile_phone = jsonObject.optString("mobile_phone");

          this.ver = jsonObject.optInt("ver");

          this.verify_code = jsonObject.optString("verify_code");
          return ;
     }

     public JSONObject  toJson() throws JSONException 
     {
          JSONObject localItemObject = new JSONObject();
          JSONArray itemJSONArray = new JSONArray();
          localItemObject.put("mobile_phone", mobile_phone);
          localItemObject.put("ver", ver);
          localItemObject.put("verify_code", verify_code);
          return localItemObject;
     }

}
